{% raw %}

<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal">
		×
	</button>
	<h3>Preview</h3>
</div>
<div class="modal-body">
	<p>
		<b>To:</b>
		<span id='preview-emails'> <% _.each(JSON.parse(friend_bills), function(item){ %> <a href="mailto:<%=item.email%>"><%=item.name%></a>,
			<%	}) %> </span>
	</p>
	<p>
		<b>Subject:</b>
		<i> 
		<% if (SB.user.name) { %>
			<%= SB.user.name %> (<%=SB.user.auth_ids[0]%>)
		<% } else { %>
			<%=SB.user.auth_ids[0]%>
		<% } %>	
		</i> shared with you bill about "<%=title%>"
	</p>
	<hr/>
	<p>
		<%=message.replace(new RegExp('\r?\n', 'g'), '<br />') %>
	</p>
	<hr/>
	<p>
		<table class="table table-striped">
			<% _.each(JSON.parse(friend_bills), function(item){ %>
			<tr>
				<td><a href="mailto:<%=item.email%>"><%=item.name%></a></td>
				<td><b style="float:right;"><%=item.amount%></b></td>
			</tr>
			<%	}) %>
		</table>
	</p>
</div>
<div class="modal-footer">
	<a href="#" id="send" class="btn btn-primary"><i class="icon-envelope icon-white"></i> Send</a>
</div>
{% endraw %}